PROG = EMCPort
OBJS = \
	EMCPort.o \
	erlInterfaceUtils.o \

SRCS = $(OBJS:.o=.cpp) erlInterfaceUtils.h

CC = @CXX@
CFLAGS = @EI_INCLUDES@ @EI_DEFINES@ @MC_INCLUDES@ @MC_DEFINES@ -Wno-write-strings @CFLAGS@
LDFLAGS = @EI_LIBS@ @EI_DEFINES@ @MC_LIBS@ @MC_DEFINES@ @PTHREAD_LIBS@ @LDFLAGS@

compile: $(PROG) install

$(PROG): $(OBJS)
	$(CC) $(OBJS) -o $(PROG) $(LDFLAGS)

%.o: %.cpp
	$(CC) -c $< $(CFLAGS)

install: $(PROG)
	mkdir -p ../priv/bin
	mv $(PROG) ../priv/bin

clean:
	rm -f *~ *.o

mrproper: clean
	rm -f ../priv/bin/
	rm -f $(PROG) Makefile
